package com.liuqianfei.markme.rules;

import java.util.ArrayList;
import java.util.List;

import com.liuqianfei.markme.MarkMeParser;
import com.liuqianfei.markme.core.Token;

public class StateCore extends AbstractState
{
    public String src;
    public MarkMeParser md;
    public Environment env;
    public List<Token> tokens = new ArrayList<>();
    public boolean inlineMode = false;
    
    public StateCore(){}

    public StateCore(String src, MarkMeParser md, Environment env)
    {
        this.src = src;
        this.md = md;
        this.env = env;
    }

    @Override
    public Environment getEnv()
    {
        return env;
    }

    @Override
    public void setEnv(Environment env)
    {
        this.env = env;
    }

    @Override
    public String getSrc()
    {
        return src;
    }

    public void setSrc(String src)
    {
        this.src = src;
    }

    @Override
    public MarkMeParser getMd()
    {
        return md;
    }

    public void setMd(MarkMeParser md)
    {
        this.md = md;
    }

    @Override
    public List<Token> getTokens()
    {
        return tokens;
    }

    @Override
    public Token getToken(int index)
    {
        return tokens.get(index);
    }

    @Override
    public void setTokens(List<Token> tokens)
    {
        this.tokens = tokens;
    }

    @Override
    public void setToken(int index, Token token)
    {
        tokens.set(index, token);
    }

    @Override
    public boolean isInlineMode()
    {
        return inlineMode;
    }

    @Override
    public void setInlineMode(boolean inlineMode)
    {
        this.inlineMode = inlineMode;
    }
}
